package Controller;

import Impl.Facade;
import Impl.Scene;
import Person.*;
import Model.*;

import java.util.ArrayList;

public class SceneThree implements Scene {
    @Override
    public void SceneSimu() throws InterruptedException {
        System.out.println("-----------SCENE 1------------");
        Thread.sleep(2000);
        //假设现在户外的人是一个boy和一个girl
        Person boy = new Boy();
        Person girl = new Girl();
        //先穿着其它的衣服
        boy.setCloth(1);
        girl.setCloth(1);
        boy.display();boy.showCloth();Thread.sleep(1000);
        girl.display();girl.showCloth();
        ArrayList<Person> personList = new ArrayList<>();
        personList.add(boy);
        personList.add(girl);
        Facade facade = new Facade(personList);
        Thread.sleep(2000);
        System.out.println("暴风雨降至！");Thread.sleep(2000);
        //使用facade统一换衣；这时使用装饰器模式换衣
        facade.changeRainClothActive();
        Thread.sleep(5000);
    }
}
